#include "menu.hpp"

Menu::Menu()
{
  bg=new Sprit("./src/resources/bouton_jouer.png");
  bg->set_x(bg->get_face()->w/2);
  bg->set_y(bg->get_face()->h/2);
  option=new Sprit();
  play=new Texte("Press ENTER for play");
}

Sprit* Menu::get_bg()
{
  return bg;
}

Menu::~Menu()
{
  if(bg)
    delete bg;
  
  if(option)
    delete option;

  if(play)
    delete play;
}

void Menu::afficher_menu(Ecran *e)
{
  e->afficher(bg->get_x(),bg->get_y(),bg->get_face());
  e->afficher(e->get_largeur()-50,e->get_hauteur()-50,play->get_texte());
  e->flip();
}
